package com.youlu.campus.service.account.impl;

import com.youlu.campus.entity.WechatWriteOffLog;
import com.youlu.campus.service.account.WechatWriteOffLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;

import java.util.Date;

@Slf4j
@Service
public class WechatWriteOffLogServiceImpl implements WechatWriteOffLogService {
    @Autowired
    private MongoTemplate mongoTemplate;

    @Override
    public WechatWriteOffLog create(WechatWriteOffLog req) {
        req.setCreatedTime(new Date());
        return mongoTemplate.insert(req);
    }
}
